﻿<%@ Page Language="C#" MasterPageFile="~/FrameMasterPage.master" AutoEventWireup="true" CodeFile="WorkOrderDetail.aspx.cs" Inherits="workOrderDetail" Title="Untitled Page" enableEventValidation="true" %>
<%@ Register Assembly="EclipseWebSolutions.DatePicker" Namespace="EclipseWebSolutions.DatePicker" TagPrefix="ews" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="m_contentBody" Runat="Server">

    <asp:Panel runat="server" ID="pnlBody">

<table  class="GridItem" cellspacing="2" cellpadding="2" style="width:auto; height:auto;">
    
    <tr>
    <td align="center" valign="top">
    
                      <table>
                        <tr><td colspan="2" class="BigLabelLeftAlign"><asp:Label ID="lblCodeNumber" runat="server" Text="Label" ></asp:Label>
                            <br /><br /></td></tr>
                        <tr>
                            <td align="left" style="width: 165px">
                            
                                Work order Nº&nbsp;
<asp:Label ID="Label1" runat="server" CssClass="redLabel">*</asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtWorkOrderNumber" runat="server" Height="17px" Width="175px" 
                                    Enabled="False"></asp:TextBox>
                                &nbsp;
                            </td>
                             
                                        </tr>
                        <tr>
                            <td align="left" style="width: 165px">
                                Work order staus
<asp:Label ID="Label2" runat="server" CssClass="redLabel" >*</asp:Label>
                            </td>
                            <td align="left">
                            <asp:UpdatePanel runat="server" ID="upl1"><ContentTemplate>
                                <asp:DropDownList ID="drlStatus" runat="server" Height="25px" Width="180px" 
                                    AppendDataBoundItems="True" DataSourceID="odsStatus" DataTextField="TaskStatusLabel" 
                                    DataValueField="TaskStatusId" AutoPostBack="True" 
                                    onselectedindexchanged="drlStatus_SelectedIndexChanged" 
                                    ontextchanged="drlStatus_TextChanged">
                                    <asp:ListItem Value="-1">--- Work Order Status ---</asp:ListItem>
                                </asp:DropDownList>
                                <asp:Label ID="lblrequiredStatus" runat="server" ForeColor="Red" 
                                    Visible="False"></asp:Label>
                                <asp:ObjectDataSource ID="odsStatus" runat="server" SelectMethod="GetTaskStaus" 
                                    TypeName="Service.WorkOrderService"></asp:ObjectDataSource>
                            </ContentTemplate></asp:UpdatePanel>
                            </td>
                            
                            
                        </tr>
                        <tr>
                            <td align="left" style="width: 165px">
                                Department
<asp:Label ID="Label3" runat="server" CssClass="redLabel" >*</asp:Label>
                            <td align="left">
                           
                                <asp:DropDownList ID="drlDepartment" runat="server" Height="25px" Width="180px" 
                                    AppendDataBoundItems="True" DataSourceID="odsDepartment" DataTextField="DepartmentLabel" 
                                    DataValueField="DepartmentId" AutoPostBack="True">
                                    <asp:ListItem Value="-1">--- Department ---</asp:ListItem>
                                </asp:DropDownList>
                                <asp:ObjectDataSource ID="odsDepartment" runat="server" 
                                    SelectMethod="GetDepartments" TypeName="Service.ReferenceDataService">
                                </asp:ObjectDataSource>
                                <asp:Label ID="lblRequiredDepartment" runat="server" ForeColor="Red" 
                                    Visible="False"></asp:Label>
                                &nbsp;
                                
                            </td>
                            
                            
                        </tr>
                          <tr>
                            <td align="left" style="width: 165px">
                                Request staff<asp:Label ID="Label4" runat="server" CssClass="redLabel">*</asp:Label>(mm/dd/y                              </td>
                            <td align="left">
                                <asp:DropDownList ID="drlEmployee" runat="server" Height="25px" 
                Width="180px" DataSourceID="odsRequester" 
                DataTextField="EmployeeName" DataValueField="EmployeeId">
            </asp:DropDownList>
            <asp:ObjectDataSource ID="odsRequester" runat="server" 
                SelectMethod="GetRequestEmployees" TypeName="Service.ReferenceDataService" 
                                    OldValuesParameterFormatString="original_{0}">
                <SelectParameters>
                    <asp:ControlParameter ControlID="drlDepartment" Name="departmentId" 
                        PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
                                <asp:Label ID="lblRequiredEmployee" runat="server" ForeColor="Red" 
                                    Visible="false"></asp:Label>
                            </td>
                           
                            
                          </tr>
                          <tr>
                            <td align="left" style="width: 165px">
                                Criteria&nbsp;
<asp:Label ID="Label5" runat="server" CssClass="redLabel">*</asp:Label>
                              </td>
                            <td align="left">
                                <asp:DropDownList ID="drlCriteria" runat="server" Height="25px" 
                          Width="180px" AppendDataBoundItems="True" DataSourceID="odsCriteria" 
                          DataTextField="CriteriaLabel" DataValueField="CriteriaId" 
                          >
                                        <asp:ListItem Value="-1">--- Choose a criteria ---</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:ObjectDataSource ID="odsCriteria" runat="server" 
                                        SelectMethod="GetCriterias" TypeName="Service.WorkOrderService">
                                    </asp:ObjectDataSource>
                                <asp:Label ID="lblRequiredCriteria" runat="server" ForeColor="Red" 
                                    Visible="false"></asp:Label>
                            </td>
                           
                            
                                    </tr>
                        <tr>
                            <td align="left" style="width: 165px">
                                Request type
<asp:Label ID="Label6" runat="server" CssClass="redLabel">*</asp:Label>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="drlRequestType" runat="server" Height="25px" 
                          Width="180px" AppendDataBoundItems="True" DataSourceID="odsRequestType" 
                          DataTextField="RequestTypeLabel" DataValueField="RequestTypeId">
                                    <asp:ListItem Value="-1">--- Choose WO request type---</asp:ListItem>
                        </asp:DropDownList>
                                    <asp:ObjectDataSource ID="odsRequestType" runat="server" 
                                        SelectMethod="GetRequestTypes" TypeName="Service.WorkOrderService">
                                    </asp:ObjectDataSource>
                                <asp:Label ID="lblRequiredRequestTypes" runat="server" ForeColor="Red" 
                                    Visible="false"></asp:Label>
                            </td>
                           
                            
                        </tr>
                        <tr>
                            <td align="left" style="width: 165px">
                                Request date (mm/dd/yy)<asp:Label ID="Label7" runat="server" 
                                    CssClass="redLabel">*</asp:Label>
                            </td>
                            <td align="left">
      
                                    
                                            <asp:TextBox ID="txtRequestDate" runat="server" Width="150px"></asp:TextBox>
            <asp:Image ID="Image1" runat="server" ImageUrl="~/images/calendar.png" />
            <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtRequestDate" PopupButtonID="Image1">
            </cc1:CalendarExtender>
                                      
                                    <asp:Label ID="lblRequiredRequestDate" runat="server" ForeColor="Red" 
                                        Visible="false"></asp:Label>
                            </td>
                           
                           
                        </tr>
                        <tr>
                            <td align="left" style="width: 165px">
                   Agree date (mm/dd/yy)</td>
                            <td align="left">
                            
                                 <asp:TextBox ID="txtAgreeDate" runat="server" Width="150px"></asp:TextBox>
            <asp:Image ID="Image3" runat="server" ImageUrl="~/images/calendar.png" />
            <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtAgreeDate" PopupButtonID="Image3">
            </cc1:CalendarExtender> 
      
                                    </td>
                           
                           
                        </tr>
                        <tr>
                            <td align="left" style="width: 165px; height: 60px;">
                                Description</td>
                            <td align="left" style="height: 60px">
                                <asp:TextBox ID="txtWODescription" runat="server" Height="59px" 
                                    Width="175px"></asp:TextBox>
                            </td>
                            
                            
                             
                        </tr>
                       
                        <tr>
                            <td align="left" style="width: 165px; height: 19px;">
            
                                <asp:CheckBox ID="chkAuthorize" runat="server" Text="Authorize" />
                                
         
         
                                </td>
                            <td align="right" style="height: 19px">
            </td>
                            
                            
                             
                        </tr>
                       
                        <tr>
                            <td align="left" style="width: 165px; height: 29px;">
                                </td>
                            <td align="right" style="height: 29px">
            
    <asp:Button ID="btnValidate" runat="server" Height="25px" Text="Validate" 
        Width="71px" CssClass="btnexpress" BorderStyle="Dotted" onclick="btnValidate_Click"  />&nbsp;&nbsp;&nbsp;<asp:Label ID="lblMessageValidate" runat="server" CssClass="permissionstyle"></asp:Label>
                                
         
         
                            </td>
                            
                            
                             
                        </tr>
                       
                </table>
   </td>
   <td valign="top">
    <table>
        <tr><td colspan="2"><br /><br /><br /></td></tr>
        <tr>
            <td style="width: 145px" align="left" colspan="2">
            <asp:UpdatePanel runat="server" ID="UpdatePanel1"><ContentTemplate>
                <asp:Label ID="lblReason" runat="server" Text="Reason"></asp:Label>
                </ContentTemplate></asp:UpdatePanel>
            </td>
        
        </tr>
        
        <tr>  <td align="left" style="width: 145px">
        <asp:UpdatePanel runat="server" ID="UpdatePanel2"><ContentTemplate>
                                <asp:TextBox ID="txtReason" runat="server" Height="57px" 
                                    Width="180px"></asp:TextBox>
                                <%--     <Triggers>
                <asp:AsyncPostBackTrigger ControlID="drlStatus" EventName="TextChanged" />
                
            </Triggers>--%>
                                   </ContentTemplate></asp:UpdatePanel>
            </td>
                            <td align="left">
                                &nbsp;</td></tr>
        <tr> <td align="left" style="width: 145px">
                                &nbsp;</td>
                            <td align="left">
                                  &nbsp;</td></tr>
        <tr>
            <td align="left" style="width: 145px">
                                &nbsp;</td>
                            <td align="left">
                                &nbsp;</td>
                                </tr>
        <tr> <td align="left">
                                &nbsp;</td>
                            <td align="left">
                                &nbsp;</td>
         </tr>
        
            <tr>
                         <td align="left" colspan="2"> 
            
         
         
                <br /></td>
            </tr>                     
                                
                                
     </table>
     </td>
     </tr>
    </table>
 </asp:Panel>
</asp:Content>

